import 'dart:convert';

import 'package:dio/dio.dart';
import 'package:flutter_ncsjqz_getx/constant/app_info.dart';
import 'package:flutter_ncsjqz_getx/util/open_util.dart';

/// todo：用于测试
void giteeUpdateUtil(){
  Dio dio = Dio();
  dio.get("https://gitee.com/jrnet/getTest/raw/master/app.json").then((value) {
    if(int.parse(AppInfo.buildNumber!) < jsonDecode(value.data)["code"]){
      print("更新${jsonDecode(value.data)["path"]}");
      OpenUrl.url(jsonDecode(value.data)["path"]);
    }
  });
}